Optimal. Leaf size=182 \[ \frac{3 b^2 \left (a+b \tan ^{-1}(c x)\right )}{2 c d^2 (-c x+i)}+\frac{3 i b \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^2 (-c x+i)}-\frac{3 b \left (a+b \tan ^{-1}(c x)\right )^2}{4 c d^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{2 c d^2}-\frac{3 i b^3}{4 c d^2 (-c x+i)}+\frac{3 i b^3 \tan ^{-1}(c x)}{4 c d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.219803, antiderivative size = 182, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 6, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {4864, 4862, 627, 44, 203, 4884} \[ \frac{3 b^2 \left (a+b \tan ^{-1}(c x)\right )}{2 c d^2 (-c x+i)}+\frac{3 i b \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^2 (-c x+i)}-\frac{3 b \left (a+b \tan ^{-1}(c x)\right )^2}{4 c d^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{2 c d^2}-\frac{3 i b^3}{4 c d^2 (-c x+i)}+\frac{3 i b^3 \tan ^{-1}(c x)}{4 c d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4864
Rule 4862
Rule 627
Rule 44
Rule 203
Rule 4884
Rubi steps
\begin{align*} \int \frac{\left (a+b \tan ^{-1}(c x)\right )^3}{(d+i c d x)^2} \, dx &=\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}-\frac{(3 i b) \int \left (-\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 d (-i+c x)^2}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 d \left (1+c^2 x^2\right )}\right ) \, dx}{d}\\ &=\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}+\frac{(3 i b) \int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{(-i+c x)^2} \, dx}{2 d^2}-\frac{(3 i b) \int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{1+c^2 x^2} \, dx}{2 d^2}\\ &=\frac{3 i b \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^2 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{2 c d^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}+\frac{\left (3 i b^2\right ) \int \left (-\frac{i \left (a+b \tan ^{-1}(c x)\right )}{2 (-i+c x)^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{d^2}\\ &=\frac{3 i b \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^2 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{2 c d^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}+\frac{\left (3 b^2\right ) \int \frac{a+b \tan ^{-1}(c x)}{(-i+c x)^2} \, dx}{2 d^2}-\frac{\left (3 b^2\right ) \int \frac{a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{2 d^2}\\ &=\frac{3 b^2 \left (a+b \tan ^{-1}(c x)\right )}{2 c d^2 (i-c x)}-\frac{3 b \left (a+b \tan ^{-1}(c x)\right )^2}{4 c d^2}+\frac{3 i b \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^2 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{2 c d^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}+\frac{\left (3 b^3\right ) \int \frac{1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{2 d^2}\\ &=\frac{3 b^2 \left (a+b \tan ^{-1}(c x)\right )}{2 c d^2 (i-c x)}-\frac{3 b \left (a+b \tan ^{-1}(c x)\right )^2}{4 c d^2}+\frac{3 i b \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^2 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{2 c d^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}+\frac{\left (3 b^3\right ) \int \frac{1}{(-i+c x)^2 (i+c x)} \, dx}{2 d^2}\\ &=\frac{3 b^2 \left (a+b \tan ^{-1}(c x)\right )}{2 c d^2 (i-c x)}-\frac{3 b \left (a+b \tan ^{-1}(c x)\right )^2}{4 c d^2}+\frac{3 i b \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^2 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{2 c d^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}+\frac{\left (3 b^3\right ) \int \left (-\frac{i}{2 (-i+c x)^2}+\frac{i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{2 d^2}\\ &=-\frac{3 i b^3}{4 c d^2 (i-c x)}+\frac{3 b^2 \left (a+b \tan ^{-1}(c x)\right )}{2 c d^2 (i-c x)}-\frac{3 b \left (a+b \tan ^{-1}(c x)\right )^2}{4 c d^2}+\frac{3 i b \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^2 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{2 c d^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}+\frac{\left (3 i b^3\right ) \int \frac{1}{1+c^2 x^2} \, dx}{4 d^2}\\ &=-\frac{3 i b^3}{4 c d^2 (i-c x)}+\frac{3 i b^3 \tan ^{-1}(c x)}{4 c d^2}+\frac{3 b^2 \left (a+b \tan ^{-1}(c x)\right )}{2 c d^2 (i-c x)}-\frac{3 b \left (a+b \tan ^{-1}(c x)\right )^2}{4 c d^2}+\frac{3 i b \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^2 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{2 c d^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^3}{c d^2 (1+i c x)}\\ \end{align*}
Mathematica [A] time = 0.222033, size = 121, normalized size = 0.66 \[ \frac{3 i b \left (-2 a^2+2 i a b+b^2\right ) (c x+i) \tan ^{-1}(c x)-6 i a^2 b+4 a^3-3 b^2 (b+2 i a) (c x+i) \tan ^{-1}(c x)^2-6 a b^2+2 b^3 (1-i c x) \tan ^{-1}(c x)^3+3 i b^3}{4 c d^2 (c x-i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.319, size = 551, normalized size = 3. \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.88012, size = 401, normalized size = 2.2 \begin{align*} -\frac{{\left (b^{3} c x + i \, b^{3}\right )} \log \left (-\frac{c x + i}{c x - i}\right )^{3} - 16 \, a^{3} + 24 i \, a^{2} b + 24 \, a b^{2} - 12 i \, b^{3} +{\left (6 \, a b^{2} - 3 i \, b^{3} -{\left (6 i \, a b^{2} + 3 \, b^{3}\right )} c x\right )} \log \left (-\frac{c x + i}{c x - i}\right )^{2} -{\left (12 i \, a^{2} b + 12 \, a b^{2} - 6 i \, b^{3} +{\left (12 \, a^{2} b - 12 i \, a b^{2} - 6 \, b^{3}\right )} c x\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{16 \,{\left (c^{2} d^{2} x - i \, c d^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.16034, size = 782, normalized size = 4.3 \begin{align*} -\frac{\frac{6 \, b^{3} d i^{2} \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )^{2}}{c d i x + d} - 2 \, b^{3} i \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )^{3} + \frac{4 \, b^{3} d i \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )^{3}}{c d i x + d} - \frac{12 \, a b^{2} d i^{2} \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )}{c d i x + d} + 6 \, a b^{2} i \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )^{2} - \frac{12 \, a b^{2} d i \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )^{2}}{c d i x + d} + \frac{6 \, a^{2} b d i^{2}}{c d i x + d} - \frac{3 \, b^{3} d i^{2}}{c d i x + d} - 6 \, a^{2} b i \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right ) + 3 \, b^{3} i \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right ) + \frac{12 \, a^{2} b d i \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )}{c d i x + d} - \frac{6 \, b^{3} d i \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )}{c d i x + d} + 3 \, b^{3} \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )^{2} - \frac{4 \, a^{3} d i}{c d i x + d} + \frac{6 \, a b^{2} d i}{c d i x + d} - 6 \, a b^{2} \arctan \left (\frac{{\left (c d i x + d\right )}{\left (\frac{d i^{2}}{c d i x + d} + 1\right )} i}{d}\right )}{4 \, c d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]